<?php
include_once ('config.inc.php');
session_start ();
class page_securisee extends page_base {
	// réécriture du constructeur
	public function __construct($p) {
		parent::__construct ( $p );
		if (isset ( $_POST ['identifiant'] ) && connexion_site ( $_POST ['identifiant'], $_POST ['motDePasse'] )) {
			$_SESSION ['identifiant'] = $_POST ['identifiant'];
		}
	}
	
	// réécriture de la méthode affiche_contenu (bien vérifier que cette méthode est
	// en visibilité protected aussi dans la classe mère « page_base »)
	protected function affiche_contenu() {
		if (isset ( $_SESSION ['identifiant'] ))
			parent::affiche_contenu ();
		else {
			echo '	<script>window.location.replace(" ./index.php ")</script>';
			parent::affiche_contenu ();
		}
	}
	protected function affiche_notification_center() {
		?>
<div class="notification-center col-xs-8 col-sm-6 col-md-3">
	<button class="btn btn-primary notification ">
		<span class="glyphicon glyphicon-chevron-right arrow"
			aria-hidden="true"></span> <br> <span
			class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span> <br>
		<span class="vertical-text"> Notifications </span> <br> <span
			class="badge">0</span> <br> <span
			class="glyphicon glyphicon-chevron-right arrow" aria-hidden="true"></span>
	</button>
	<h2>Centre de notifications</h2>
	<div class="growl-container">
	
	</div>
</div>

<?php
	}
	
	/**
	 * ************ Affichage du menu de la page (mode connecté) **************************
	 */
	protected function affiche_menu() {
		if (isset ( $_SESSION ['identifiant'] )) {
			// Si utilisateur admin
			if (utilCoTypeC ( $_SESSION ['identifiant'] ) == 1) {
				?>

<nav class="navbar navbar-default navbar-fixed-top">
	<div class="container-fluid">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" id="logo" href="#"></a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-expanded="false">Ajout <span
						class="caret"></span>
				</a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="addClients.php" id="AddClient">Ajouter un client</a></li>
						<li><a href="AjoutCabinet.php" id="AddClient">Ajouter un cabinet</a></li>
					</ul></li>
				<li><a href="gestClients.php" id="GestClient active">G&eacuterer les
						ressources</a></li>
				<li><a href="gestTypes.php" id="GestType">G&eacuterer les types de
						licences</a></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-expanded="false">Gestion
						des sms <span class="caret"></span>
				</a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="gestSMSClients.php" id="AddClient">R&eacutecapitualtif
								des SMS</a></li>
						<li><a href="GestFactureSMS.php" id="AddClient">G&eacuterer les
								factures</a></li>
						<li><a href="AjoutTarif.php" id="AddClient">Ajouter nouveaux
								tarifs</a></li>
						<li><a href="GestTarifSMS.php" id="AddClient">G&eacuterer les
								tarifs</a></li>
					</ul></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-expanded="false">Statistiques
						<span class="caret"></span>
				</a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="Analystics.php" id="AddClient">Utilisation des SMS</a></li>
						<li><a href="DynamicMap.php" id="Backup">Localisation Cabinets</a></li>
					</ul></li>
				<li><a href="changePwd.php" id="ChgPwd">Changer le mot de passe</a></li>
				<li><a href="administration.php" id="Backup">Administration</a></li>
				<li><button type="button" class="identification btn btn-danger" onclick="window.location.replace(' ./deconnexion.php ')">Déconnexion</button></li>
			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid -->
</nav>
<div class="container form-signin bs-docs-container ">
						<?php
			}  // Si utilisateur dev
else {
				?>
					<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<button type="button" class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li><a href="gestClients.php" id="GestClient">G&eacuterer les
								licences</a></li>
						<li><a href="changePwd.php" id="ChgPwd">Changer le mot de passe</a></li>
					</ul>
				</div>
				<!--/.nav-collapse -->
			</div>
		</div>
	</div>
	<div class="form-signin">
					<?php
			}
		}
	}
}
?>